Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add fake K8s API server #1610

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

mquhuy
Copy link
Member

@mquhuy mquhuy commented Apr 22, 2024

Fake API server is a tool running inside a kubernetes cluster, and "generates" in-memory api server endpoints. These endpoints can be used, for e.g., to represent the clusters created by CAPM3 using fake hardware so that CAPI confirms that the cluster was provisioned successfully.

@metal3-io-bot metal3-io-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Apr 22, 2024
@mquhuy mquhuy force-pushed the mquhuy/add-fake-apiserver branch 2 times, most recently from e9a7158 to d4b4b60 Compare April 24, 2024 08:14
@metal3-io-bot metal3-io-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 24, 2024
@mquhuy mquhuy force-pushed the mquhuy/add-fake-apiserver branch from d4b4b60 to 6a24a8f Compare April 24, 2024 09:43
@mquhuy mquhuy force-pushed the mquhuy/add-fake-apiserver branch from 6a24a8f to a1e125f Compare May 15, 2024 08:40
@mquhuy
Copy link
Member Author

mquhuy commented May 15, 2024

/cc @lentzi90 @kashifest @Rozzii @tuminoid @adilGhaffarDev
This was proven to work, it's ready for reviews

@tuminoid
Copy link
Member

There is unrelated broken link failure, need to address that in another PR preferably.

Copy link
Member

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits for starters.

hack/fake-apiserver/Dockerfile Outdated Show resolved Hide resolved
hack/fake-apiserver/Dockerfile Outdated Show resolved Hide resolved
hack/fake-apiserver/Dockerfile Outdated Show resolved Hide resolved
hack/fake-apiserver/README.md Outdated Show resolved Hide resolved
@mquhuy mquhuy force-pushed the mquhuy/add-fake-apiserver branch 2 times, most recently from 02cc265 to 2ee5877 Compare May 15, 2024 11:18
Copy link
Member

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Dockerfile is broken now.

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
hack/fake-apiserver/README.md Outdated Show resolved Hide resolved
@mquhuy mquhuy force-pushed the mquhuy/add-fake-apiserver branch 2 times, most recently from 4b229a6 to 2a3401d Compare May 15, 2024 11:33
hack/fake-apiserver/go.mod Outdated Show resolved Hide resolved
hack/fake-apiserver/main.go Outdated Show resolved Hide resolved
hack/fake-apiserver/README.md Outdated Show resolved Hide resolved
hack/fake-apiserver/README.md Outdated Show resolved Hide resolved
hack/fake-apiserver/main.go Outdated Show resolved Hide resolved
hack/fake-apiserver/main.go Outdated Show resolved Hide resolved
hack/fake-apiserver/README.md Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
@Rozzii Rozzii added this to the 1.8.0 milestone Jun 28, 2024
@mquhuy mquhuy force-pushed the mquhuy/add-fake-apiserver branch from 2a3401d to 009fe7c Compare July 1, 2024 06:56
@mquhuy mquhuy force-pushed the mquhuy/add-fake-apiserver branch 4 times, most recently from d3d61a0 to 267f75e Compare August 2, 2024 11:14
@mquhuy mquhuy force-pushed the mquhuy/add-fake-apiserver branch from 267f75e to 120d427 Compare September 3, 2024 11:48
@metal3-io-bot metal3-io-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 3, 2024
@mquhuy mquhuy force-pushed the mquhuy/add-fake-apiserver branch from b168e54 to ab25a62 Compare October 15, 2024 14:04
@metal3-io-bot metal3-io-bot removed the needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. label Oct 15, 2024
@mquhuy mquhuy force-pushed the mquhuy/add-fake-apiserver branch 2 times, most recently from 44405b2 to f1c6f5e Compare October 16, 2024 07:09
@mquhuy
Copy link
Member Author

mquhuy commented Oct 16, 2024

Q: Have we considered using https://kcp.io/ for this?

This was answered offline, just posting it here for completeness.
Personally I don't think kcp.io could be used for our purpose. At best, we could use it as a replacement for CAPIM, but we would still need something like FKAS to manage it and handle it as we want. And as it provides real k8s API and etcd, we are likely end up consuming much more resources than we are now with CAPIM.

@mquhuy mquhuy force-pushed the mquhuy/add-fake-apiserver branch from f1c6f5e to a9e1485 Compare October 16, 2024 07:18
@Rozzii
Copy link
Member

Rozzii commented Oct 17, 2024

/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main

@mquhuy
Copy link
Member Author

mquhuy commented Oct 17, 2024

/retest

1 similar comment
@mquhuy
Copy link
Member Author

mquhuy commented Oct 17, 2024

/retest

@mquhuy mquhuy force-pushed the mquhuy/add-fake-apiserver branch 7 times, most recently from eee721e to 93901ff Compare October 17, 2024 09:52
@mquhuy
Copy link
Member Author

mquhuy commented Oct 17, 2024

/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main

Copy link
Member

@mboukhalfa mboukhalfa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work this has been tested locally with fakeIPA and created scaled number of clusters
I left some comment else LGTM

hack/fake-apiserver/README.md Outdated Show resolved Hide resolved
hack/fake-apiserver/README.md Show resolved Hide resolved
hack/fake-apiserver/README.md Show resolved Hide resolved
hack/fake-apiserver/cmd/metal3-fkas-reconciler/main.go Outdated Show resolved Hide resolved
hack/fake-apiserver/cmd/metal3-fkas/utils.go Outdated Show resolved Hide resolved
hack/fake-apiserver/cmd/metal3-fkas/main.go Outdated Show resolved Hide resolved
hack/fake-apiserver/cmd/metal3-fkas/main.go Show resolved Hide resolved
@mquhuy mquhuy force-pushed the mquhuy/add-fake-apiserver branch from 93901ff to d2ded66 Compare October 17, 2024 12:52
@mquhuy
Copy link
Member Author

mquhuy commented Oct 17, 2024

Great work this has been tested locally with fakeIPA and created scaled number of clusters I left some comment else LGTM

Thanks @mboukhalfa. I've responded to/fixed all of your inline comments.

@mboukhalfa
Copy link
Member

/approve

@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mboukhalfa

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 17, 2024
Copy link
Member

@Rozzii Rozzii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 17, 2024
@Rozzii
Copy link
Member

Rozzii commented Oct 17, 2024

/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main

@mboukhalfa
Copy link
Member

/test metal3-centos-e2e-integration-test-main

@metal3-io-bot metal3-io-bot merged commit 02e1678 into metal3-io:main Oct 17, 2024
18 checks passed
@metal3-io-bot metal3-io-bot deleted the mquhuy/add-fake-apiserver branch October 17, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
Status: Done / Closed
Development

Successfully merging this pull request may close these issues.

8 participants